refactor(drivers/139): adapt new capacity calculation#2651
Merged
Conversation
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the China Mobile 139 driver’s storage quota retrieval to use a unified “quota detail” endpoint, aligning reported total/used space with the platform’s newer capacity calculation behavior.
Changes:
- Replaced separate personal/family disk info requests with a single
getDiskQuotaDetailrequest to/user/disk/quota/detail. - Updated quota response typing (
DiskQuotaDetail) and simplified usage computation inGetDetails. - Removed now-unused legacy family disk info logic and MD5 helper/import.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| drivers/139/util.go | Switches disk info retrieval to the new quota detail endpoint and removes legacy helpers. |
| drivers/139/types.go | Replaces old disk info response types with the new DiskQuotaDetail model. |
| drivers/139/driver.go | Updates GetDetails to compute total/used space from the new quota detail response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jyxjjj
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
重构磁盘信息获取逻辑,合并个人和家庭磁盘信息请求为统一的配额详情请求,适配新版移动云盘容量计算
/ 此 PR 包含破坏性变更。
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
/ 此 PR 需要关联仓库同步修改。
Related repository PRs / 关联仓库 PR:
Related Issues / 关联 Issue
Close: https://github.com/orgs/OpenListTeam/discussions/2352
Testing / 测试
go test ./...Before:
After:
Checklist / 检查清单
/ 我已阅读 CONTRIBUTING。
/ 我确认此贡献符合仓库许可证、贡献规范和行为准则。
gofmt,go fmt, orprettierwhere applicable./ 我已按适用情况使用
gofmt、go fmt或prettier格式化变更代码。/ 我已在适用情况下请求相关维护者或代码所有者审查。